/* You can customize the fonts used in the stylesheet here */

h1, h2, h3, h4, h5, h6 {
    font-family: "Poppins", sans-serif;
}

b, strong {
    font-weight: bold;
}

mark, .redacted, s, ins, del {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

pre, code, samp, kbd, var, .monospace {
    /* font-family: 'Epub Monospace'; */
    font-family: "Space Mono", "Andale Mono", "Courier New", Courier, monospace;
}

blockquote p, .epub-collapse-header {
    text-indent: 0;
    font-family: "Space Mono", "Andale Mono", "Courier New", Courier, monospace;
}



/* Font-stacks */
/* Typical usage: headings */
/* .sans { font-family: sans-serif; }
.serif { font-family: serif; }
.monospace { font-family: monospace; } */

/* We try to rely on RS’ typefaces, hence the huge font-stack */
/* .humanist { font-family: "Myriad Pro", Seravek, Ember, "Trebuchet MS", "BN Trebuchet MS", "PT Sans", "Frutiger Neue", Roboto, sans-serif; }
.geometric { font-family: Futura, "Century Gothic", "Apple SD Gothic Neo", AppleGothic, sans-serif; }
.oldstyle { font-family: "Minion Pro", "Iowan Old Style", Palatino, "Palatino Linotype", "Palatino Nova", "BN Amasis", Cambria, FreeSerif, "Times New Roman", serif; }
.modern { font-family: Athelas, Literata, Bookerly, "Merriweather Serif", Malabar, "BN Malabar", Georgia, "Droid Serif", serif; } */

@namespace epub "http://www.idpf.org/2007/ops";

/*
This file is used with the --view option to emulate what e-readers might see
*/

:root {
    --foreground: #000000;
    --background: #fbfbfb;
    --border-color: #999;

    --light-background: rgba(127, 127, 127, 0.05);
    --mid-background: rgba(127, 127, 127, 0.3);
    --foreground-color: rgba(0, 0, 0, 1);
    --background-color: rgba(255, 255, 255, 0);
    --link-color: #c30c01;

    --theme-white-color: #000000;
    --theme-white-background: #fbfbfb;
    --theme-white-border: #999;

    --theme-sepia-color: #000000;
    --theme-sepia-background: #f8f1e3;
    --theme-sepia-border: #999;

    --theme-gray-color: #c9caca;
    --theme-gray-background: #5a5a5c;
    --theme-gray-border: #c9caca;

    --theme-night-color: #b0b0b0;
    --theme-night-background: #000000;
    --theme-night-border: #999;
}

:root[__ibooks_internal_theme*="White"] /* elements */ {
    /* ... override your CSS here ... */
    --foreground: var(--theme-white-color);
    --background: var(--theme-white-background);
    --border-color: var(--theme-white-border);
}


:root[__ibooks_internal_theme*="Sepia"] /* elements */ {
    /* ... override your CSS here ... */
    --foreground: var(--theme-sepia-color);
    --background: var(--theme-sepia-background);
    --border-color: var(--theme-sepia-border);
}

:root[__ibooks_internal_theme*="Gray"] /* elements */ {
    /* ... override your CSS here ... */
    --foreground: var(--theme-gray-color);
    --background: var(--theme-gray-background);
    --border-color: var(--theme-gray-border);
    --link-color: #ff7f7f;
}

/* For Night Theme PLEASE READ COMMENTS BELOW */
:root[__ibooks_internal_theme*="Night"], :root /* elements */ {
    --foreground: var(--theme-night-color);
    --background: var(--theme-night-background);
    --border-color: var(--theme-night-border);
    --link-color: #c30c01;
    
    /* ... override background-color: */
    /* background: -webkit-linear-gradient(color, (the same) color); */

    /* ... override text color: */
    /* -webkit-text-fill-color: var(--foreground-color); */

    /* ... override rest of your CSS here ... */
}

/*
PLEASE READ CAREFULLY:
iBooks adjusts HTML and CSS markup behind the scenes in many ways and when the Night theme is selected (not White or Sepia),
these CSS styles (among others) are forced:
:root {
    background-color: black !important;
}
:root * {
    background-color: transparent !important;
    color: #bebebe !important;
}
If you need to override background or text color of *any* element in the Night theme, use the CSS above, but please WISELY
and only when absolutely necessary.
I believe that abusing this method will cause it banned by Apple in future iBooks releases.
*/

html, body {
    margin: 1em;
    color: var(--foreground);
    background-color: var(--background);
    box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	font-variant-numeric: proportional-nums;
}

a {
    color: var(--link-color);
}

#main-content, .toc-body {
    max-width: 48em;
    margin: 0 auto;
}

.toc-body .toc-list {
    margin: 1.2em 0;
    padding-left: 5%;
}